package com.sdy.supermarket.biz.mapper;

import com.sdy.mvc.mapper.BaseMapper;
import com.sdy.supermarket.biz.model.GsRes;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 资源表 Mapper 接口
 * </p>
 *
 * @author zzq
 * @since 2019-07-16
 */
public interface GsResMapper extends BaseMapper<GsRes> {

    /**
     * 批量更新数据
     *
     * @param list
     * @return
     */
    int batchUpdate(List<GsRes> list);


    /**
     * 获取近七天的数据
     * @return
     */
    @Select("select * from gs_res where create_time between current_date()-8 and SYSDATE()- INTERVAL 1 DAY;")
    List<GsRes> get7DaysList();

}
